package com.company.huisuo.network.api

import com.company.huisuo.biz.bean.AppGameStartReqVO
import com.company.huisuo.biz.bean.AppGameLotteryReqVO
import com.company.huisuo.biz.bean.AppGameParticipantReqVO
import com.company.huisuo.biz.bean.AppGameAddCustomerReqVO
import com.company.huisuo.biz.bean.GameStartResponse
import com.company.huisuo.biz.bean.GameLotteryResponse
import com.company.huisuo.biz.bean.GamePlayRecordResponse
import com.company.huisuo.biz.bean.GameParticipantListResponse
import com.company.huisuo.biz.bean.DeleteGameParticipantResponse
import com.company.huisuo.biz.bean.AddCustomerResponse
import com.company.huisuo.biz.bean.AppGameNotParticipantRespVO
import com.company.huisuo.biz.bean.NotParticipantListResponse
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * 游戏API接口
 */
interface GameApi {
    
    /**
     * 游戏开始
     * @param appGameStartReqVO 游戏开始请求体
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @POST("/app-api/play/game-play/gameStart")
    suspend fun gameStart(
        @Body appGameStartReqVO: AppGameStartReqVO,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): GameStartResponse
    
    /**
     * 获取游戏抽奖结果
     * @param appGameLotteryReqVO 游戏抽奖请求体
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @POST("/app-api/play/game-play/gameLottery")
    suspend fun gameLottery(
        @Body appGameLotteryReqVO: AppGameLotteryReqVO,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): GameLotteryResponse
    
    /**
     * 添加游戏参与人
     * @param appGameParticipantReqVO 游戏参与人请求体
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @POST("/app-api/play/game-play/addGameParticipant")
    suspend fun addGameParticipant(
        @Body appGameParticipantReqVO: AppGameParticipantReqVO,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): GameStartResponse
    
    /**
     * 游戏添加客户
     * @param appGameAddCustomerReqVO 游戏添加客户请求体
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @POST("/app-api/play/game-play/addCustomer")
    suspend fun addCustomer(
        @Body appGameAddCustomerReqVO: AppGameAddCustomerReqVO,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): AddCustomerResponse
    
    /**
     * 获取游戏游玩记录
     * @param gameId 游戏ID
     * @param sessionId 会话ID
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @GET("/app-api/play/game-play/getPlayRecord")
    suspend fun getPlayRecord(
        @Query("gameId") gameId: Long,
        @Query("sessionId") sessionId: Long,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): GamePlayRecordResponse
    
    /**
     * 获取游戏参与人列表
     * @param gamePlayRecordId 游戏游玩记录ID
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @GET("/app-api/play/game-play/getGameParticipantList")
    suspend fun getGameParticipantList(
        @Query("gamePlayRecordId") gamePlayRecordId: Long,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): GameParticipantListResponse
    
    /**
     * 删除游戏参与人
     * @param participantId 参与人ID
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @DELETE("/app-api/play/game-play/deleteGameParticipant")
    suspend fun deleteGameParticipant(
        @Query("participantId") participantId: Long,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): DeleteGameParticipantResponse
    
    /**
     * 获取未参与游戏艺人列表
     * @param gamePlayRecordId 游戏游玩记录ID
     * @param tenantId 租户编号（可选）
     * @param authorization 认证Token（可选）
     */
    @GET("/app-api/play/game-play/getNotParticipantList")
    suspend fun getNotParticipantList(
        @Query("gamePlayRecordId") gamePlayRecordId: Long,
        @Header("tenant-id") tenantId: Int? = null,
        @Header("Authorization") authorization: String? = null
    ): NotParticipantListResponse
}